package com.zxy;

import java.util.Scanner;

public class demo01 {
    public static void main(String[] args) {
        int[] arr1 = {1, 2, 3, 4};
        int[] arr2 = {5, 6, 7};
        int[] temp = arr1;

        System.out.println("通过temp取出arr1中的元素: ");

        for (int i = 0; i < temp.length; i++) {
            System.out.print(temp[i] + " ");
        }
        //以上程序会打印什么？
        //1 2 3 4

        temp = arr2;

        System.out.println("通过temp取出arr2中的元素: ");

        for (int i = 0; i < temp.length; i++) {
            System.out.print(temp[i] + " ");
        }
    }
}